package bb.lanxing.chart.sample;

import java.util.List;

import bb.lanxing.chart.sample.result.SportMapPointSampleResult;
import bb.lanxing.chart.sample.result.i.ISampleResult;
import bb.lanxing.model.database.IRouteBookPoint;
public class SportMapRoutePointDisSample extends LushuPointDistanceSample {
    @Override
    public ISampleResult<IRouteBookPoint> sample(double d, List<? extends IRouteBookPoint> list, int i) {
        if (list.size() <= i) {
            findExtremePoint(list);
        }
        sampleData(d, list, i);
        SportMapPointSampleResult sportMapPointSampleResult = new SportMapPointSampleResult();
        sportMapPointSampleResult.setDistanceList(getSampledDistance());
        sportMapPointSampleResult.setSampleDataSourceList(getSampleDataSource());
        sportMapPointSampleResult.setMaxAltitude(this.maxAltitude);
        sportMapPointSampleResult.setMinAltitude(this.minAltitude);
        return sportMapPointSampleResult;
    }
}